package com.homework.vehicle.Auto;

/**
 * @author xiyu
 * @version 1.0
 * @date 2025/3/26 19:21
 * @description
 */
public class Truck extends AutoMobile{
    private String truck;

    public Truck() {
    }

    public Truck(String type, String truck) {
        super(type);
        this.truck = truck;
    }

    public String getTruck() {
        return truck;
    }

    public void setTruck(String truck) {
        this.truck = truck;
    }

    @Override
    public void getInfo(){
        System.out.print(getType()+truck);
    }
    @Override
    public void atk() {
        System.out.println("无法攻击");
    }

    @Override
    public String toString() {
        return "Truck{" +
                "truck='" + truck + '\'' +
                '}';
    }
}
